home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / amac34.arc / RFRM23.QM < prev    next >
Text File  |  1991-02-16  |  58KB  |  1,261 lines

  1. *                              (RFRM23).QM
  2. *┌──────(INDEX) Macros to Reformat Blocks, Paragraphs and Documents ───────────┐
  3. *│                                                                Bytes
  4. *│@(F1) Right Justifies DOCUMENT                                   119<change
  5. *│@(F2) Right Justifies DOCUMENT, Screen preview                    14
  6. *│@(F4) Removes Right Justification from LINE or BLOCK              87
  7. *│@(F5) Removes Right Justification from DOCUMENT                   96
  8. *│@(F7) Deletes ALL BLANK lines in document                         23
  9. *│@(F8) Deletes all but single space BLANK lines in document        24
  10. *│
  11. *│@(1)  Adds asterisk and space in front of BLOCK                   27
  12. *│@(t)  Adds asterisk and space in front of BLOCK (Tim Farley)      44
  13. *│@(3)  Adds asterisk and space in front of BLOCK or PARAGRAPH      18
  14. *│@(6)  Adds asterisk and one space in column 1                     12
  15. *│@(5)  Deletes first two characters of line                        11
  16. *│@(4)  Deletes asterisk and one space in column 1                  25
  17. *│@(7)  Deletes asterisk and ALL space at beginning of line         17
  18. *│@(2)  Deletes asterisk and one space in front of BLOCK            11
  19. *│@(9)  COUNTS number of words in a document, words=letters/numbers 50
  20. *│@(0)  COUNTS number of words in a document, words sep. by spaces  85
  21. *│@(n)  COUNTS number of characters in a document                   95
  22. *│
  23. *│^(3_) Formats PARAGRAPH, fast and small                            8
  24. *│^(0_) Formats PARAGRAPH                                           60
  25. *│^(5_) Formats DOCUMENT with blank lines forming PARAGRAPHS        26
  26. *│^(8_) Formats QMAC txtfile BLOCK with asterisks in col. 1         61
  27. *│^(9_) Formats BLOCK.  Must position cursor at BLOCK begin         62
  28. *│^(7_) Formats Message Reader Paragraph     (Tim Farley)          132
  29. *│
  30. *│^(b)  Replace "period space" w/ "period two_spaces" - PARAGRAPHS  54
  31. *│^(c)  Replace "period space" w/ "period two_spaces" - DOCUMENT    44
  32. *│
  33. *│^(F9_)  Make a COMMA delimited file          (Sammy Mitchell)     37
  34. *│^(F10_)"Break apart" a COMMA delimited file  (Sammy Mitchell)     54
  35. *│
  36. *│@(h)  Select Index item with cursor line, then <enter>.           47
  37. *│
  38. *│(Index)          - How to locate macro or item below from Index using @h
  39. *│(Description)    - Reformat Macros
  40. *│(Macros)         - Reformat Macros
  41. *│(Other) Macros   - not included
  42. *│(Test) Paragraph To Reformat
  43. *│(Version) history
  44. *└────────[ be sure to leave at least one blank line at end of Index  ]────────┘
  45.  
  46.  
  47. * (Description):
  48.  
  49. * (RFRM23).QM are macros to reformat QEDIT blocks, paragraphs, and
  50. * documents.   Asterisks are also added and deleted in front of lines,
  51. * block, and paragraphs. Number of words and characters in a document
  52. * can also be counted. Comma delimited files can also be made and
  53. * "broken apart". Documents can formatted with right justification.
  54. *
  55. * If column width of the unformatted paragraphs and blocks are greater
  56. * than 80 columns, there must be enough blank lines for ^8, 9 & 0 to
  57. * paste the reformatted text back and not overlap unformatted areas.  In
  58. * other words, BE CAREFUL!
  59. *
  60. * For faster macro execution, replace "C:" with your ram drive.
  61. *
  62. * Insert and AutoIndent should be ON.
  63. *
  64. * (Other) Macros available: See ALLMACRO.INF.
  65.  
  66.  
  67. * (Index) Use;
  68. *
  69. * To locate a macro or item in this file, press @h, place the cursor
  70. * line on the desired item in the Index above, and press <enter>.
  71. * See BOOK15.QM for more details.
  72.  
  73. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  74.  
  75. * To BEGIN, just type "START RFRM" <Enter>. All pertinent files will be
  76. * loaded in the "Ring" for viewing, and RFRM23.MAC is read.
  77. * Alternatively, type "START RFRM 0" <Enter> and the disk copies of all
  78. * files in the "Ring" will be loaded ready for editing, saving time.
  79.  
  80.  
  81.  
  82. * (Macros):------------
  83.  
  84. * ┌───────────────────────────────────────────────────────────────────┐
  85. * │@(1) Place asterisk and space in column 1 in front of marked block │
  86. * └───────────────────────────────────────────────────────────────────┘
  87.  
  88. * To run, first mark and close a block with markblockbegin and
  89. * markblockend, markline, or dropanchor.  Blocks may contain blank
  90. * lines.  No column blocks, please.  The cursor may then be positioned
  91. * anywhere to run.  Press Alt and 1 at the same time.  An asterisk and a
  92. * space are placed in column 1 in front of the marked block only.
  93. * Marked block does NOT have to be a paragraph as in Alt_2.  If a block
  94. * is not marked, the cursor line is treated as a block, and an asterisk
  95. * and space are placed in column 1 the same as done with Alt_6.
  96.  
  97. @1 macrobegin
  98.         cut                             * cut block to scrap
  99.         editfile "$" return             * load $ (temp file)
  100.         quit                            * quit if in ring
  101.         editfile return                 * reload
  102.         paste                           * paste block to $
  103.  NEXT:                                  * come here until done
  104.         begline                         * stay in column 1
  105.         "* "                            * put asterisk space in col 1
  106.         cursordown                      * move down to next line
  107.  jtrue  NEXT:                           * if not done go to NEXT
  108.         begfile                         * go to begfile $
  109.         markblockbegin                  * get line 1 col 1 in block
  110.         copy                            * get block w/asterisks to scrap
  111.         quit                            * quit $
  112.         paste                           * put block back with asterisks
  113.  END:
  114. *
  115. * 27 bytes Tue  09-11-1990  19:28:29
  116.  
  117.  
  118. *┌──────────────────────────────────────┐
  119. *│ @(t) Alternate version of @1         │
  120. *└──────────────────────────────────────┘
  121.  
  122. * Here's an alternate version of Alt_1 from Tim Farley of SemWare that
  123. * seems to do the same thing.  It's faster, runs smoother, but is a
  124. * little larger if that's important.  I feel Tim came up with a better
  125. * way to do the same thing by using shiftright and fillblock.  Use
  126. * whichever you prefer that get's the job done for you.
  127. *
  128. * PN>I tried out two dBase commenting macros (from Tom Hogshead) last night.
  129. * PN>Neither of them does quite what I'm trying to achieve.
  130. * PN>
  131. * PN>What I need to do is comment out (i.e., put an asterisk in front of)
  132. * PN>each line in a blocked area.
  133. *
  134. * Here's an alternate version that uses the column marking ability,
  135. * ShiftRight, and FillBlock to do the job.
  136.  
  137. * TH>When marking a block with markblockbeg and markblockend, it adds one
  138. * TH>extra line to the bottom of the block.  Adding cursorup in line #11
  139. * TH>seems to get things to comment out the block as originally marked.
  140. * TH>Line blocks work OK.
  141. *
  142. * Hmmmm....I'll try it out.
  143. *
  144. * Ooops!  I guess I broke part of it in my last minute tweaking.
  145. *
  146. * Here is a version that works right in *all* cases, including a
  147. * single line:
  148.  
  149. *
  150. * DBASE COMMENT OUT MACRO
  151. *
  152. * Mark a block (doesn't matter if it is a char, line or column block).
  153. * Hit this key, and all the lines in the block will be commented out
  154. * with a "* " at the beginning of the line.
  155. *
  156. * After it is done, the block will be left marked as a line block,
  157. * and the cursor will be at the top of the block.
  158. *
  159. * Correctly detects case where you are in the middle of marking,
  160. * and also the case where no block is marked.
  161. *
  162. @t   MacroBegin
  163.      GotoBlockBeg              * Has block been closed?
  164.      GotoBlockEnd JTrue doit:  * if cursor moved, go ahead
  165.      MarkLine                  * no movement?  close block
  166.      GotoBlockEnd JFalse end:  * no movement?  no block!  quit.
  167.    doit:
  168.      EndLine BegLine           * <----NEW  for single line case
  169.      GotoBlockEnd              * Remember end of the block
  170.      GotoBlockBeg              * But go to beginning
  171.      MarkLine                  * Mark as line from here...
  172.      PrevPosition              * ...to the previous end of block.
  173.      MarkLine
  174.      BegLine                   * <----NEW  for column block case
  175.      ShiftRight ShiftRight     * Two characters over please
  176.      GotoBlockEnd              * Remember end of the block
  177.      GotoBlockBeg              * But go to beginning
  178.      MarkColumn                * Start marking a column
  179.      PrevPosition              * ...to end of previous block
  180.      BegLine                   * But only in column 1 of these lines
  181.      MarkColumn                * ...and finish marking.
  182.      FillBlock "*" Return      * Fill Column 1 with Stars!
  183.      GotoBlockEnd              * Remember end of the block
  184.      GotoBlockBeg              * But go to beginning
  185.      MarkLine
  186.      PrevPosition MarkLine     * Re-mark as a line block
  187.      GotoBlockBeg              * And leave us at the top.
  188.      Jump done:
  189.    end:
  190.      UnMarkBlock
  191.    done:
  192. *
  193. * 44 bytes Fri  08-24-1990  16:23:16 (line added TH )
  194.  
  195.  
  196. * Interestingly enough, since "*" is also a comment mark for QEdit
  197. * macros, you can use this to comment out lines in QEdit macros
  198. * too!
  199. *
  200. * There is one special case where this macro can do something odd,
  201. * and that is if you mark a single line as a block and comment it
  202. * out.   But since a single line can be commented out just by
  203. * hitting HOME and typing "*", I doubt that will be a problem.
  204. *
  205. * One nice side effect:  it leaves the lines marked as lines, so if
  206. * you want to *uncomment* them, just hit ShiftLeft twice.
  207. *
  208. * If you remove the comments and reformat, I think you can fit this
  209. * in QCONFIG.DAT.
  210. *
  211. * --Tim Farley
  212.  
  213.  
  214.  
  215. * ┌────────────────────────────────────────────────────────────────┐
  216. * │@(2)   Deletes asterisk and one space in front of marked block  │
  217. * └────────────────────────────────────────────────────────────────┘
  218. @2 macrobegin
  219.         gotoblockbeg                    * block?
  220.  JFalse END:                            * no block!  end
  221.         shiftleft shiftleft             * delete asterisk and space
  222.         unmarkblock                     * unmarkblock
  223.  END:
  224. *
  225. * 11 bytes Wed  08-22-1990  10:29:17
  226.  
  227.  
  228.  
  229.  
  230.  
  231. * ┌────────────────────────────────────────────────────────────────────┐
  232. * │@(3) Places an asterisk and space in front of block that IS a       │
  233. * │   paragraph and also in front of any paragraph that is NOT marked  │
  234. * │   as a block from the cursor to the end of the paragraph.          │
  235. * └────────────────────────────────────────────────────────────────────┘
  236. *
  237. * To run, first either mark a paragraph as a block with markblockbegin
  238. * and markblockend or position the cursor at the beginning of a
  239. * paragraph in column 1.  After loading the macro, press Alt and 3 at
  240. * the same time.  An asterisk and a space are placed in column 1 in
  241. * front of the block, or the paragraph from the cursor to the end
  242. * of the paragraph.  Remember, a paragraph is defined as having a
  243. * blank line at the beginning and end.
  244. *
  245. @3 macrobegin
  246.         gotoblockbeg                    * go to block begin
  247.  NEXT:                                  *
  248.         endline begline                 * end if line blank
  249.  jfalse END:                            * if line blank, go to end
  250.         "* "                            * put asterisk space in col 1
  251.         cursordown                      * move down to next line
  252.  jump  NEXT:                            * cycle until done
  253.  END:                                   *
  254. *
  255. * 18 bytes Mon  08-20-1990  22:19:35
  256.  
  257.  
  258.  
  259. * ┌───────────────────────────────────────────────────────────┐
  260. * │@(4) Deletes asterisk and SINGLE space at beginning of line│
  261. * └───────────────────────────────────────────────────────────┘
  262. * Use to remove asterisk and space inserted with Alt_6.  Lines with
  263. * no asterisk are not changed.
  264. *
  265. @4 macrobegin
  266.  START:
  267.         unmarkblock                     * unmark any blocks
  268.         begline                         * go to begline
  269.         markcolumn                      * mark it
  270.         cursorright                     * go to column 2
  271.         find "*"  return                * find asterisk space
  272.         "BL" return                     * back in block only
  273.  jfalse NEXT:                           * if found
  274.         delch                           * delete asterisk
  275.         delch                           * delete space
  276.   NEXT:                                 * come here if no astk in col 1
  277.         cursordown                      * down to next line
  278.         begline                         * begline
  279.         unmarkblock                     * unmark
  280. *
  281. * 25 bytes Tue  08-21-1990  13:30:16
  282.  
  283.  
  284.  
  285.  
  286. * ┌─────────────────────────────────────────────────────────┐
  287. * │@(5) Deletes first two characters at beginning of line   │
  288. * └─────────────────────────────────────────────────────────┘
  289.  
  290. * Lines without an asterisk will also have the first two spaces
  291. * deleted.  This macro is considerably smaller than @4 (11 vs 35 bytes),
  292. * but it is not quite as safe; @4 will NOT erase the first two
  293. * characters unless the first one is an asterisk.
  294.  
  295. @5 macrobegin
  296.  START:
  297.         unmarkblock                     * unmark
  298.         begline                         * go to begline
  299.         markline                        * mark line
  300.         shiftleft                       * shift char 1 out of block
  301.         shiftleft                       * shift char 2 out of block
  302.         unmarkblock                     * unmark line
  303.         cursordown                      * down to next line
  304. *
  305. * 11 bytes Tue  09-11-1990  17:33:17
  306.  
  307.  
  308.  
  309. * ┌──────────────────────────────────────────────────────┐
  310. * │@(6) Adds asterisk and one space at beginning of line │
  311. * └──────────────────────────────────────────────────────┘
  312. * Useful in preparing txtfiles for QMAC.  To run, just press Alt_6 and an
  313. * aste isk and blank space are inserted in column 1 and 2 in front of
  314. * any other text on the line.  Use Alt_4 or 5 to remove asterisk and
  315. * space inserted with this macro.
  316. *
  317. @6  macrobegin
  318.         unmarkblock
  319.         begline
  320.         "* "
  321.         cursordown
  322.         begline
  323. *
  324. * 12 bytes Mon  07-30-1990  11:03:14
  325.  
  326.  
  327.  
  328.  
  329. * ┌───────────────────────────────────────────────────────────┐
  330. * │@(7) Deletes asterisk and any space at beginning of line   │
  331. * └───────────────────────────────────────────────────────────┘
  332. * To run, press Alt_7, and the asterisk in column 1 on the cursorline
  333. * and all space up to the first word on the line is deleted.  This
  334. * macro erases too much if there are two asterisks and no letters on
  335. * same line.
  336. *
  337. @7 macrobegin
  338.         unmarkblock                     * get ready
  339.         begline                         * go to begline
  340.         delch                           * delete first asterisk
  341.         endline begline                 * check if anything else on line
  342.  jfalse NEXT:                           * if line blank, go to next
  343.         markcolumn                      * otherwise, mark begline
  344.         wordright                       * go to first word on line
  345.         cursorleft                      * get cursor off word
  346.         deleteblock                     * delete all space to beginline
  347.   NEXT:                                 *
  348.         cursordown                      * cursordown and end
  349. *
  350. * 17 bytes Mon  07-30-1990  11:03:26
  351.  
  352.  
  353.  
  354. * ┌────────────────────────────────────────────────────────────────────┐
  355. * │@(9) Macro To Count Words In Document, Words are letters and numbers│
  356. * └────────────────────────────────────────────────────────────────────┘
  357. * This macro counts the number of words in a document. A "word" is at
  358. * least one letter or number separated by a space or the following word
  359. * separators:
  360. *                   !@#$%^&*'()+|-=\,./;'[]<>?:"{}
  361. * If it's important to you that words be considered as "any string
  362. * separated by at least one space", macro @0 below is the macro to
  363. * use. The @9 macro counts words like "can't" as two words; @0 counts
  364. * them as one word.
  365. * Test macro using the calibrated file WORD (19 words).
  366. * -----------------------------------
  367. * @9 Macro To Count Words In Document
  368. * -----------------------------------
  369. * [ Number of WORDS in document ] = [ Number of LINES in temp file ]
  370. *
  371. @9   Macrobegin                         *
  372. *----Be sure last line is blank---------*
  373.      endfile begline                    * Check for blank line at end
  374.      jfalse START: addline              * If last line is NOT blank,
  375.                                         * test fails, then addline
  376. *----Copy Words to Scratch Buffer-------*
  377.  START: begfile insertline              * Insert blank line at top to
  378.                                         * be sure to find first word
  379.      wordright markword                 * Mark first word
  380.      cursorup delline                   * Delete blank line
  381.      storescrbuff "1" return            * Store word to scratch buffer
  382.  COUNT: cursordown                      * Check if on last line
  383.      jfalse GETCOUNT: cursorup          * If can't cursor down, must
  384.                                         * be on last line, go to
  385.                                         * GETCOUNT, or cursorup
  386.                                         *ELSE
  387.      WordRight MarkWord                 * Move to next word and mark it
  388.      jfalse COUNT:                      * If at endline, no word exists
  389.                                         * so COUNT again
  390.                                         *ELSE
  391.      appendscrbuff "1" return           * Append word to scratch
  392.      jump COUNT:                        * and go-to COUNT again
  393. *----Get Word Count---------------------*
  394.  GETCOUNT: editfile "!" return quit     * Quit temp file
  395.      editfile return                    * Load temp file to count words
  396.      getscrbuff "1" return              * Make list of words
  397.      unmarkblock endfile                * WORD COUNT = # LINES
  398. *
  399. * 50 bytes Sat  10-13-1990  03:18:33
  400.  
  401.  
  402.  
  403. * ┌─────────────────────────────────────────────────────────────┐
  404. * │@(0) Counts words in a document, words separated by spaces   │
  405. * └─────────────────────────────────────────────────────────────┘
  406. * @0 differs from @9 in that a "word" with @0 is considered any string
  407. * separated by at least one space. @9 macro considers a "word" to be at
  408. * least one letter or number separated by a space or the following word
  409. * separators: !@#$%^&*'()+|-=\,./;'[]<>?:"{} ... @9 counts words like
  410. * "can't" as two words; @0 counts them as one word.
  411. *
  412. * @0 is a little longer and slower than @9, but if it's important to
  413. * you that words be considered as "any string separated by at least
  414. * one space", this is the macro to use.
  415. * Test macro using the calibrated file WORD (46 words).
  416. * -----------------------------------
  417. * @0 Macro To Count Words In Document
  418. * -----------------------------------
  419. * [ Number of WORDS in document ] = [ Number of LINES in temp file ]
  420. *
  421. @0 Macrobegin
  422. *----Toggle Insert ON-------------------*
  423.         insertline "a" cursorleft "a"   * Insert test line
  424.         endline jtrue WASON:            * If not at endline-Insert is ON
  425.         toggleinsert Jump WASOFF:       * Or Insert is off-toggle ON
  426.  WASON:  cursorleft                     * Clean up cursor movement
  427.  WASOFF: cursorleft delline             * Clean up cursor movement
  428. *----Copy Document to Temp File---------*
  429.         BegFile markblockbegin          * Mark document
  430.         EndFile markblockend            *
  431.         editfile "!" return             * Load temp file
  432.         killfile quit editfile return   * Kill/quit/load temp file
  433.         copyblock unmarkblock           * Copy doc to temp file
  434.         endfile addline begfile         * Add blank line at end
  435. *----Split Words One Word Per Line------*
  436.  COUNT1: Find " " Return  Return        * Find first space
  437.  COUNT2: Return                         * Put next word on next line
  438.  NOSPACE: CursorDown                    * Move down to next line
  439.         jfalse DELBLANKLINES:           * If can't move down must be
  440.                                         * on last line, then begin to
  441.                                         * delete all blank lines
  442.         cursorup                        * Move back up one line
  443.         repeatfind                      * Find another space
  444.         jTrue COUNT2:                   * Put next word on next line
  445. *----Delete Blank Lines-----------------*
  446.  DELBLANKLINES: begfile                 * Get to begin of file
  447.  CHK4BLANK: endline begline             * Check if line has text
  448.         jtrue  NOTBLANK:                * If so, go to NOTBLANK
  449.         delline                         * Or line is blank, delete it
  450.         jtrue CHK4BLANK:                * Go check next line
  451.  NOTBLANK: endpara                      *ELSE  Move to pargraph end
  452.         cursordown                      * Move down to next line
  453.         jfalse GETCOUNT:                * If on last line, GETCOUNT
  454.         jump CHK4BLANK:                 * If not, check for more blank lines
  455. *----Get Word Count---------------------*
  456.  GETCOUNT: findreplace " " return "|"   * Remove all extra spaces
  457.         backspace return "GN" return    *
  458.         makebotofscreen                 * WORD COUNT = # LINES
  459. *
  460. * 89 bytes Sat  10-13-1990  02:44:52
  461. * 85 bytes Mon  10-15-1990  21:58:35
  462.  
  463.  
  464.  
  465.  
  466.  
  467. * ┌────────────────────────────────────────────────────────┐
  468. * │@(n) Counts the number of characters in a document      │
  469. * └────────────────────────────────────────────────────────┘
  470. * This macro counts the number of characters in a document. After
  471. * running, the byte size of a modified document file with all spaces
  472. * removed is shown in col. 1 on the last line. Subtract 2 x number of
  473. * lines from the byte size to get the number of characters.
  474. * Test macro using the calibrated file WORD (138 -2 x 6 = 126 chars.)
  475. * ----------------------------------------------------
  476. * @n Macro To Count Number Of Characters In A Document
  477. * ----------------------------------------------------
  478. @n Macrobegin
  479. *----Copy Document to Temp File---------*
  480.         BegFile markblockbegin          * Mark document
  481.         EndFile markblockend            *
  482.         editfile "!" return             * Load temp file
  483.         killfile quit editfile return   * Kill/quit/load temp file
  484.         copyblock unmarkblock           * Copy doc to temp file
  485. *----Remove All Spaces------------------*
  486.         findreplace " " return "|"      * Remove single space globally
  487.         backspace return "GN" return    *
  488. *----Delete Blank Lines-----------------*
  489.  DELBLANKLINES: begfile                 * Get to begin of file
  490.  CHK4BLANK: endline begline             * Check if line has text
  491.         jtrue  NOTBLANK:                * If so, go to NOTBLANK
  492.         delline                         * Or line is blank, delete it
  493.         jtrue CHK4BLANK:                * Go check next line
  494.  NOTBLANK: endpara                      *ELSE  Move to pargraph end
  495.         cursordown                      * Move down to next line
  496.         jfalse GETCOUNT:                * If on last line, GETCOUNT
  497.         jump CHK4BLANK:                 * If not, check for more blank lines
  498. *----Get Number of Characters-----------*
  499.  GETCOUNT:                              *
  500.         savefile                        * Save tmmp file to get size
  501.         DOS "dir " currentfilename      * Get size with Dir
  502.         ">c:$" return return            * Save DIR list to temp c:$
  503.         editfile "c:$" return           * Load DIR listing of temp file
  504.         gotoline "4" return             * Drop down to file line
  505.         wordright markword copy         * Get size to scrap
  506.         killfile quit                   * Kill/quit c:$
  507.         editfile "!" return killfile    * Load & kill temp file
  508.         begline paste makebotofscreen   * Character Count = Byte Size
  509.                                         *   minus 2 x Number of Lines
  510. * 95 bytes Sat  10-13-1990  11:27:13
  511.  
  512.  
  513.  
  514.  
  515. * ┌─────────────────────────────────────────────────────────────────────┐
  516. * │^(3_) Formats a paragraph.  (Macro has been around a long time)      │
  517. * └─────────────────────────────────────────────────────────────────────┘
  518. *
  519. 04 macrobegin
  520.         cursordown                      * move down one line
  521.         prevpara                        * get to beginning of paragraph
  522.         wrappara                        * reformat
  523.         nextpara                        * go to begin next paragraph
  524. *
  525. * 8 bytes Wed  08-01-1990  10:47:36
  526.  
  527.  
  528.  
  529.  
  530. * ┌─────────────────────────────────────────────────────────────────────┐
  531. * │^(5_) Formats complete document with blank lines forming paragraphs  │
  532. * └─────────────────────────────────────────────────────────────────────┘
  533. *
  534. 06 MacroBegin
  535.         unmarkblock                     * unmark
  536.         begfile                         * get to file begin
  537.         setrmargin "69" return          * set new right margin
  538.    FORMAT:                              *
  539.    jfalse FINISH:                       * no more para? go to FINISH
  540.         WrapPara                        * reformat
  541.         NextPara                        * get to begin next paragraph
  542.    jump FORMAT:                         *
  543.    FINISH:                              * no more paragraphs
  544.         setrmargin "80" return          * reset right margin
  545. *
  546. * 26 bytes Wed  09-12-1990  16:47:
  547.  
  548.  
  549. *┌─────────────────────────────────────┐
  550. *│^(7_) Format Message Reader Paragraph│
  551. *└─────────────────────────────────────┘
  552. * Here's a handy macro from Tim Farley of SemWare to reformat a message
  553. * reader paragraph. Remember, paragraphs are reformated to the width
  554. * of the right margin setting, so set as needed.
  555. *
  556. * ==============================================================================
  557. * Date: 10-01-90 (19:09)           Number: 3041         SemWare Support BBS
  558. *   To: DAN SNAPPER                Refer#: 3028
  559. * From: TIM FARLEY                   Read: YES
  560. * Subj: Message reformat macro       Conf: (21) ILink
  561. * ------------------------------------------------------------------------
  562. * DS>   Does anyone have a macro to reformat a quoted 'off-line'
  563. * DS>   message paragraph and then reinsert the quotes back?
  564. * DS>
  565. * DS>
  566. * DS>
  567. *
  568. * Here it is:
  569. *
  570. *
  571. * Reader Paragraph Reform
  572. *   Mark a line block, hit this key, and it will reform the text, leaving
  573. *   all "II>" quoting on the left alone.
  574. *
  575. *   Assumes that ">" is the last character of the "quoting" mark.
  576. *   Also assumes that WordWrap is currently on when you hit it,
  577. *   and that there is a currently marked block.
  578. *
  579.  
  580. 08   MacroBegin OneWindow
  581.      GotoBlockBeg GotoBlockEnd JTrue doit: MarkLine GotoBlockEnd
  582.    doit:
  583.      ToggleWordWrap EndLine #254 ToggleWordWrap
  584.      GotoBlockBeg GotoColumn "16" Return Find ">" Return "BL" Return
  585.      JTrue foundit:
  586.      BegLine
  587.    foundit:
  588.      CursorRight
  589.      UnmarkBlock MarkColumn Find #254 Return "N" Return
  590.      GotoColumn "512" Return MarkColumn BegLine GotoBlockBeg
  591.      Cut
  592.      MarkLine CopyBlock CopyBlock CopyBlock UnmarkBlock
  593.      HorizontalWindow EditFile "$$$$$$$$.tmp" Return
  594.      BegFile BegLine         * Top of files in case it was already here
  595.      InsertLine InsertLine   * ??
  596.      Paste UnMarkBlock       * put block in place
  597.      EndFile AddLine BegFile * mandatory blank line on end
  598.    more:
  599.      WrapPara                * wrap each para
  600.      JTrue more:             * until none left
  601.      DelLine
  602.      BegFile BegLine
  603.      Find Return Return      * find our goofy char again
  604.      DelCh                   * and delete it
  605.      GotoColumn "512" Return MarkColumn BegFile BegLine MarkColumn
  606.      Cut Quit PrevWindow OneWindow
  607.      Paste GotoBlockEnd CursorDown BegLine UnMarkBlock
  608. *
  609. * 132 bytes Tue  10-02-1990  16:51:06 (added TH)
  610.  
  611. * This macro is too long for QCONFIG, you'll have to use QMAC to
  612. * compile it.  Then put the compiled macro files in some directory,
  613. * and add the following option to the command line your reader runs
  614. * QEdit with:
  615. *
  616. *      /Ld:\dir\filename.ext
  617. *
  618. * where D:\DIR\FILENAME.EXT is the full drive, path, and name of
  619. * the compiled binary macro file.
  620. *
  621. * I've used this macro myself to reformat quotes, for over a year
  622. * now.
  623. *
  624. * --Tim Farley
  625. *   SemWare Technical Support
  626.  
  627.  
  628.  
  629.  
  630. * ┌─────────────────────────────────────────────────────────────────────┐
  631. * │^(8_) Formats QMAC txtfile block with asterisk in column 1           │
  632. * └─────────────────────────────────────────────────────────────────────┘
  633. * To run, position the 'cursor line' on the first line of the block to
  634. * reformat.  Press Ctl_8, then cursor down to bottom of block to
  635. * reformat.  To reformat, press 'Enter' when the block is marked.  This
  636. * macro differs from Ctl_9 in that the block does not include the
  637. * asterisk and blank space; in Ctl_9 the block starting position is
  638. * selected by the starting position of the cursor line.  This macro also
  639. * differs from Ctl_0 which formats a paragraph from first blank line
  640. * which has no text or asterisk on line to last blank line.
  641. *
  642. *
  643. 09 macrobegin
  644.         unmarkblock                     * get ready
  645.         gotocolumn "512" return         * get all block to format
  646.         markcolumn                      * mark begin of block
  647.                 begline                 * start at line begin
  648.                 wordright               * get to first word on line
  649.         cursordown                      * position to cursor down
  650.         makectrofscreen                 * see better
  651.         pause                           * cursor to end, then 'Enter'
  652.         markcolumn                      * mark end of block
  653.         gotoblockbeg                    * Get to block begin
  654.  JFalse END:                            * No block? End
  655.         cut                             * Get into scrap
  656.         editfile "C:$" return           * load C:$ (temp file)
  657.         paste                           * paste block to C:$
  658.         setrmargin "69" return **       * set rt margin to 69
  659.                                         ** change "69" as needed
  660.         wrappara                        * format block
  661.         setrmargin "80" return          * reset rt margin to 80
  662.         begfile                         * get to block begin
  663.         markcolumn                      * mark
  664.         endfile                         * mark endblock
  665.         gotocolumn "69" return **       * get all block marked
  666.                                         ** change "65" as needed
  667.         copy                            * get formatted block to scrap
  668.         killfile quit                   * kill/quit C:$
  669.         pasteover                       * Put back formatted, marked
  670.         makectrofscreen                 * better view
  671.  END:
  672. *
  673. * 61 bytes Tue  09-11-1990  19:21:48
  674.  
  675.  
  676.  
  677.  
  678. * ┌─────────────────────────────────────────────────────────────────────┐
  679. * │^(9_) Formats Block.  Must position cursor at beginning of block     │
  680. * └─────────────────────────────────────────────────────────────────────┘
  681. * To run, position the 'cursor' at the beginning of the block to
  682. * reformat.  Press Ctl_9, then cursor down to bottom of block to
  683. * reformat.  Press 'Enter' when the block is marked.  This macro differs
  684. * from Ctl_8 in that the starting position of the block to be
  685. * reformatted is selected by the starting position of the cursor; in
  686. * Ctl_8 the block starting POSITION is selected by the starting
  687. * position of the cursor line.
  688. *
  689. *
  690. 10 macrobegin
  691.         unmarkblock                     * get ready
  692.         gotocolumn "512" return         * get all block to format
  693.         markcolumn                      * mark begin of block
  694.         prevposition                    *
  695.         begline                         *
  696.         prevposition                    *
  697.         makectrofscreen                 * see better
  698.         cursordown                      * position to cursor down
  699.         pause                           * cursor to end, then 'Enter'
  700.         markcolumn                      * mark end of block
  701.         gotoblockbeg                    * Get to block begin
  702.  JFalse END:                            * No block? End
  703.         cut                             * Get into scrap
  704.         editfile "C:$" return           * load C:$ (temp file)
  705.         paste                           * paste block to C:$
  706.         setrmargin "69" return **       * set rt margin to 69
  707.                                         ** change "69" as needed
  708.         wrappara                        * format block
  709.         setrmargin "80" return          * reset rt margin to 80
  710.         begfile                         * get to block begin
  711.         markcolumn                      * mark
  712.         endfile                         * mark endblock
  713.         gotocolumn "69" return **       * get all block marked
  714.                                         ** change "69" as needed
  715.         copy                            * get formatted block to scrap
  716.         killfile quit                   * kill/quit C:$
  717.         pasteover                       * Put back formatted, marked
  718.         makectrofscreen                 * better view
  719.  END:
  720. *
  721. * 62 bytes Tue  09-11-1990  19:09:31
  722.  
  723. *        This is a test block.  To format, place the "cursor" on "t" in
  724. *               in "this" on line 1.  Then press Ctl_9 and cursor down to
  725. *               block end.  When the block has been marked press
  726. *               'Enter'.
  727. *               Asterisks need not be removed.
  728.  
  729.  
  730.  
  731.  
  732. * ┌─────────────────────────────────────────────────────────────────────┐
  733. * │^(0_) Formats Paragraph Only.  Keeps in original indented position   │
  734. * └─────────────────────────────────────────────────────────────────────┘
  735.  
  736. * To run, place cursor line anywhere in a paragraph, and press Ctl_0.
  737. * This macro yields the same formatted paragraph as does Ctl_3 if
  738. * the right margin is set to 69 in the QEdit menu or in QCONFIG.DAT.
  739. * This macro is the starting point for putting together macros Ctl_8
  740. * and 9.  If there are asterisks in column 1 they are also formatted as
  741. * part of the paragraph.
  742.  
  743. 11 macrobegin
  744.         unmarkblock                     * get ready
  745.         cursordown                      * get into paragraph
  746.         prevpara                        * get to paragraph begin
  747.         markcolumn                      * mark column
  748.         endpara                         * get to paragraph end
  749.         gotocolumn "512" return         * get all paragraph in block
  750.         markcolumn                      * mark paragraph
  751.         gotoblockbeg                    * Get to paragraph begin
  752.  JFalse END:                            * No block? End
  753.         cut                             * Get into scrap
  754.         editfile "C:$" return           * load C:$ (temp file)
  755.         paste                           * paste block to C:$
  756.         setrmargin "69" return **       * set rt margin to 69
  757.                                         ** change "69" as needed
  758.         wrappara                        * format block
  759.         setrmargin "80" return          * set rt margin to 80
  760.         begfile                         * get to block begin
  761.         markcolumn                      * mark
  762.         endfile                         * mark end block
  763.         gotocolumn "69" return **       * get all block marked
  764.                                         ** change "69" as needed
  765.         copy                            * get formatted block to scrap
  766.         killfile quit                   * kill/quit C:$
  767.         paste                           * Put back formatted, marked
  768. *         pasteover                       * Put back formatted, marked
  769.         begline
  770.         makectrofscreen                 * better view
  771.  END:
  772. *
  773. * 60 bytes Tue  09-11-1990  19:12:08
  774.  
  775.  
  776. *****************************TEST PARAGRAPH************************************
  777.  
  778.        This is a (test) paragraph.
  779.                 Place the cursor line anywhere in this paragraph to run.
  780.                 Press Ctl and 0 at the same time.
  781.                 Be sure AutoIndent is ON.  (Long line for test )==>>>>>>>>>>>>>> ***************************************** ***************************************** ***************************************** ***************************************** ***************************************** *****************************************
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788. ******************************TEST PARAGRAPH***********************************
  789.  
  790. *┌───────────────────────────────────────────────────────────────────┐
  791. *│@(h) Finds first word on cursor line marked in document below      │
  792. *└───────────────────────────────────────────────────────────────────┘
  793. *
  794. *        @h macro has 2 steps:
  795. *
  796. *        1.  Press @ and h at the same time.  An ! shows at the
  797. *        end of the top line.  Cursor down to desired line in Index.
  798. *
  799. *        2.  Press Enter.  The macro first erases the !, and
  800. *        then finds the first word on the cursor line in the document
  801. *        below marked with (...).
  802. *
  803. * See BOOK15.QM for more details.
  804. *
  805. @h macrobegin
  806.         unmarkblock                     * unmark any marked blocks
  807.         begfile endline                 * go to file begin endline
  808.         "!"                             * put ! at endline
  809.         begline
  810.         find "!" return return begline  * highlight !
  811.         pause                           * pause for Index selection
  812.         wordright markword              * mark first word on line
  813.         copy                            * copy word to scrap buffer
  814.         begfile                         * begfile
  815.         find "!" return return delch    * find & delete !
  816.         endpara                         * go to end of Index
  817.         makectrofscreen                 * cursor line center of window
  818.         find "(" paste ")"
  819.         return "I" return               * find first marked word in doc
  820.  jfalse NOMARK:
  821.         begline                         * if mark found go to begline
  822.  jump END:
  823.  NOMARK:
  824.         begfile                         * if no mark found go to begfile
  825.  END:
  826. *
  827. * 47 bytes Fri  09-14-1990  14:06:26
  828.  
  829.  
  830.  
  831. *┌───────────────────────────────────────────────────────────────────┐
  832. *│ @(F1) Right Justify to file with same prefix, ".rj" extension     │
  833. *└───────────────────────────────────────────────────────────────────┘
  834. * Macros @F1 and @F2 use the right justification program RJ.COM which is
  835. * included and must be located in current directory or path. See below
  836. * for documentation of RJ.COM.
  837.  
  838. *
  839. @F1 macrobegin
  840.         Unmarkblock Insertline Begfile  * Insert temp line with        |
  841.         Dropanchor Currentfilename      * CurrentFileName marked       |
  842.         Find "." Return "B" Return      * Find dot backwards           |
  843.         jtrue HASEXT:                   * If dot found, file has extn. |
  844.                                         * and go to HASEXT             |
  845.                                         * ELSE                         |
  846.         Endline "." Cursorleft          * Add ".", file has NO extn.   |
  847.  HASEXT:                                *                              |
  848.         Cursorright Deltoeol "rj"       * THEN add "rj" after dot
  849.         Cut Savefile                    * Cut name.rj to scrap/SaveFILE|
  850.         DOS "RJ " Currentfilename       * Right justify file
  851.         ">" Paste Return Return         *
  852.         Editfile Paste Return Quit      *
  853.         Editfile Return                 * Load justified file
  854.  FIRSTWORD:                             * FIRSTWORD loop removes right
  855.                                         * justification from last line
  856.                                         * of paragraph, often neater!
  857.         EndPara Begline                 * Get to end of paragraph
  858.         Shiftright Wordright            * Put cursor on start of first
  859.         Shiftleft Cursorleft            * word on line
  860.         Markcolumn Endline Markcolumn   * Marks from first word to eol
  861.         Makebotofscreen
  862.         FindReplace "    " Return " " Return "LN" Return begline
  863.         FindReplace "   "  Return " " Return "LN" Return begline
  864.         FindReplace "  "   Return " " Return "LN" Return
  865.         Unmarkblock
  866.         NextPara                        * Get to begin next paragraph
  867.         jfalse FINISH:                  * No more para? go to FINISH
  868.  jump FIRSTWORD:                        * and to last line
  869.  FINISH:                                * No more paragraphs
  870.         Begfile                         *
  871. *
  872. * 126 bytes Tue  12-04-1990  20:55:28
  873. * 119 bytes Fri  02-15-1991  12:50:02
  874.  
  875. * ......................Documentation for RJ.COM...................
  876. *
  877. *  USAGE: RJ <INFILE> { PRINT_MARGIN F S }
  878. *
  879. *  WHERE: 0=< PRINT_MARGIN =<40              Default = 0   enter like: 8
  880. *   F FILTERS control chars                  Default = OFF enter like: F
  881. *   S SUPPRESS Line Feeds after CR           Default = OFF enter like: S
  882. *
  883. *  PURPOSE:  RJ  Right Justifies  your  printer output,  making  it look
  884. * professional.  RJ  right  justifies  text  files  by  imbedding blanks
  885. * between  words. It  is compatible  with  VDE or  any other  ASCII text
  886. * editor. Public domain.
  887. *
  888. *  METHOD: RJ  imbeds spaces  between words.  It calculates  the longest
  889. * line in the  file (40 to  255 char), then  justifies shorter lines (up
  890. * to  15%  shorter ). Non-printable  control characters  are not counted
  891. * for  formatting  purposes, so  leave  them  in if  you  wish. Carriage
  892. * Returns,  Line  Feeds,  Form  Feeds,  and  Tabs  are  always processed
  893. * normally  and  printed. Indenting  at  the  beginning of  the  line is
  894. * disregarded, but any  line with 3+  IMBEDDED spaces, or  any line with
  895. * Tabs is not justified. This leaves tables, charts, etc. intact.
  896. *
  897. *   HINTS: All  parameters except  INFILE are  optional and  they may be
  898. * entered in any order; the defaults are above. Note that the input file
  899. * is left unalterd;  output defaults to  the screen. This  allows you to
  900. * preview your  printer output.  To print  or copy  your right justified
  901. * file, use the DOS redirection operator: RJ REPORT.TXT  F 6 > PRN. Save
  902. * your normal parameters in a batch file.
  903.  
  904.  
  905.  
  906.  
  907. *┌──────────────────────────────────────────┐
  908. *│ @(F2) Right Justify, screen preview      │
  909. *└──────────────────────────────────────────┘
  910. * Macros @F1 and @F2 use the right justification program RJ.COM which is
  911. * included and must be located in current directory or path. See above
  912. * for documentation of RJ.COM.
  913. *
  914. @f2 Macrobegin
  915.     Savefile
  916.     DOS "RJ " Currentfilename Return
  917. *
  918. * 14 bytes Sun  12-02-1990  01:02:50
  919.  
  920.  
  921.  
  922. *┌───────────────────────────────────────────────────────────────────┐
  923. *│@(F4) Removes Right Justification from line or block               │
  924. *└───────────────────────────────────────────────────────────────────┘
  925. * Position cursor on first line to be un-justified, press @F4, then
  926. * cursor down to last line to be un-justified, and press <Enter>.
  927. * If cursor is between paragraphs, cursor is automatically placed on the
  928. * first word of the next paragraph.
  929. *
  930. @f4 macrobegin
  931.         unmarkblock
  932.  START:
  933.         endline begline                 * Test if line not blank
  934.         jtrue FIRSTWORD:                * If not blank, goto FIRSTWORD
  935.         wordright                       * If blank, goto first word
  936.         jump START:                     * and check for blank line again
  937.  FIRSTWORD:                             *
  938.         shiftright wordright            * Put cursor on start of first
  939.         shiftleft cursorleft            * word on line,
  940.         gotocolumn "512" return         * Get all line to un-justify
  941.         markcolumn prevposition         * Mark column at first word
  942.         begline                         * Reposition screen
  943.         jfalse NEXT:                    * If first word in col. 1,
  944.                                         * test is false, go to NEXT
  945.         prevposition                    * Otherwise, back to first word
  946.  NEXT:
  947.         pause                           * Pause to cursor to last line
  948.         markcolumn                      * Mark end of block
  949.         gotoblockbeg                    * Get to block begin
  950.         FindReplace "    " Return " " Return "LN" Return
  951.         FindReplace "   "  Return " " Return "LN" Return
  952.         FindReplace "  "   Return " " Return "LN" Return
  953.         Unmarkblock                     *
  954.         nextpara                        *
  955.         makectrofscreen                 *
  956. *
  957. * 87 bytes Fri  12-07-1990  12:32:09
  958.  
  959.  
  960.  
  961. *┌───────────────────────────────────────────────────────────────────┐
  962. *│ @(F5) Removes Right Justification from DOCUMENT                   │
  963. *└───────────────────────────────────────────────────────────────────┘
  964. *
  965. @f5 macrobegin
  966.         begfile unmarkblock             *
  967.  START:                                 *
  968.         endline begline                 * Test if line not blank
  969.         jtrue FIRSTWORD:                * If so, goto FIRSTWORD
  970.         wordright                       * If not, move to first word
  971.         jump START:                     * and check for blank line again
  972.  FIRSTWORD:                             * FIRSTWORD loop removes right
  973.                                         * justification from paragraph
  974.         begline
  975.         shiftright wordright            * Put cursor on start of first
  976.         shiftleft cursorleft            * word on line,
  977.         markcolumn endpara              * and start column mark
  978.         gotocolumn "512" return         * Be sure to get all para in block
  979.         markcolumn                      * Mark para as block
  980.         begline makebotofscreen
  981.         FindReplace "    " Return " " Return "LNB" Return
  982.         FindReplace "   "  Return " " Return "LNB" Return
  983.         FindReplace "  "   Return " " Return "LNB" Return
  984.         Unmarkblock
  985.         NextPara                        * Get to begin next paragraph
  986.         jfalse FINISH:                  * No more para? go to FINISH
  987.  jump FIRSTWORD:                        * and to last line
  988.    FINISH:                              * No more paragraphs
  989.         begfile
  990. *
  991. * 96 bytes Wed  12-05-1990  10:42:45
  992.  
  993.  
  994.  
  995. * ┌─────────────────────────────────────────────┐
  996. * │@(F7) Deletes ALL BLANK lines in document    │
  997. * └─────────────────────────────────────────────┘
  998. *
  999. @F7 macrobegin
  1000.         begfile                         * Go to bof
  1001.  CHK4BLANK:                             *
  1002.         endline begline                 * Check if line has text
  1003.         jtrue  NOTBLANK:                * If so, go to NOTBLANK
  1004.         delline                         * Or line is blank, delete it
  1005.         jtrue CHK4BLANK:                * Go check next line
  1006.  NOTBLANK:                              *ELSE
  1007.         endpara                         * Move to pargraph end
  1008.         cursordown                      * Move down to next line
  1009.         jfalse END:                     * If on last line, END macro
  1010.         jump CHK4BLANK:                 * If not, check for more blank lines
  1011.  END:                                   *
  1012.         begfile                         * Go to bof
  1013. *
  1014. * 23 bytes Thu  10-11-1990  20:59:17
  1015.  
  1016.  
  1017.  
  1018.  
  1019. * ┌────────────────────────────────────────────────────────────────┐
  1020. * │@(F8) Deletes all blank lines but single space in documnent     │
  1021. * └────────────────────────────────────────────────────────────────┘
  1022. * Puts first non-blank line on top.
  1023. *
  1024. @F8 macrobegin
  1025.         begfile                         * Go to bof
  1026.  CHK4BLANK:                             *
  1027.         endline begline                 * Check if line has text
  1028.         jtrue  NOTBLANK:                * If so, go to NOTBLANK
  1029.         delline                         * Or line is blank, delete it
  1030.         jtrue CHK4BLANK:                * Go check next line
  1031.  NOTBLANK:                              *ELSE
  1032.         endpara                         * Move to pargraph end
  1033.         cursordown                      * Move down to next line
  1034.         cursordown                      * Move down to next line
  1035.         jfalse END:                     * If on last line, END macro
  1036.         jump CHK4BLANK:                 * If not, check for more blank lines
  1037.  END:                                   *
  1038.         begfile                         * Go to bof
  1039. *
  1040. * 24 bytes Thu  10-11-1990  21:12:50
  1041.  
  1042.  
  1043.  
  1044.  
  1045. * ==============================================================================
  1046. * Date: 10-10-90 (11:44)           Number: 10442        SemWare Support BBS
  1047. *   To: ALL                        Refer#: NONE
  1048. * From: SAMMY MITCHELL               Read: NO
  1049. * Subj: MACROS                       Conf: (0) Main Board
  1050. * ------------------------------------------------------------------------
  1051. * We (SemWare) have been asked on many occasions how to change the CR/LF
  1052. * characters at EOF to something else.  In most instances, the task that
  1053. * the user wanted to accomplish could be done in another way.  For
  1054. * example, we've had many requests to convert a mailing list file to a
  1055. * comma delimited file for import into a database.  Here are some example
  1056. * macros to make a comma delimited file, and convert a comma delimited
  1057. * file back to its original format.  These macros will have to be
  1058. * compiled with Qmac, as they are too large for Qconfig.  I do hope that
  1059. * this helps someone!
  1060. *
  1061. *  (Key assignements changed TH    Wed  10-10-1990  )
  1062. * ---------------------------------------------------------------------
  1063. * ^(F9_) Macro to make a comma delimited file from a file of the format:
  1064. * ---------------------------------------------------------------------
  1065. * record 1
  1066. * record 2
  1067. * record n
  1068. *
  1069. * Each group of name/address must be followed by at least one blank
  1070. * line.
  1071.  
  1072. ^F9 MacroBegin
  1073.         BegFile                         * make sure at top
  1074.   while1:
  1075.         BegLine EndLine jTrue while2:   * break out if non empty line
  1076.         DelLine                         * delete the blank line
  1077.         CursorDown jFalse macroexit:    * exit macro if eof
  1078.         CursorUp                        * back up to the line to test
  1079.         jump while1:                    * keep looping while blank
  1080. * nonblank line found - see if next line is nonblank also
  1081.   while2:
  1082.         cursorDown jFalse macroexit:    * exit macro if eof
  1083.         BegLine EndLine jFalse while1:  * if blank line, start over
  1084.         CursorUp EndLine "," JoinLine   * join the next line
  1085.         jump while2:                    * and keep on until blank
  1086.   macroexit:
  1087.         BegFile                         * show user bof
  1088. *
  1089. * 37 bytes Wed  10-10-1990  22:16:45 (line added TH)
  1090.  
  1091.  
  1092.  
  1093.  
  1094. * ---------------------------------------------------------------------
  1095. * ^(F10_) Macro to "break apart" a comma delimited file, as created from
  1096. *       the ^F9  macro above.
  1097. * ---------------------------------------------------------------------
  1098.  
  1099. ^f10 MacroBegin
  1100.         BegFile                         * start at bof
  1101.   find_first_comma:
  1102.         Find "," Return "" Return       * find first comma
  1103.         jFalse macroexit:               * exit if none
  1104.   makeline:
  1105.         UnMarkBlock
  1106.         DelCh                           * delete the ','
  1107.         SplitLine                       * split the line
  1108.         CursorDown                      * next line
  1109.         BegLine                         * column 1
  1110. * remove leading blanks
  1111.   delete_blanks:
  1112.         UnMarkBlock
  1113.         DropAnchor
  1114.         Find " " Return "GL" Return     * blank found?
  1115.         jFalse continue                 * no, continue
  1116.         DelCh                           * delete it
  1117.         jump delete_blanks:             * and try again
  1118.   continue:
  1119.         UnMarkBlock
  1120.         MarkLine                        * look for next  ,' on line
  1121.         Find "," Return "L" Return      *
  1122.         jTrue makeline:                 * split if found
  1123.         UnMarkBlock
  1124.         AddLine                         * otherwise, add a blank line
  1125.         jump find_first_comma:          * and look for another ','
  1126.   macroexit:
  1127.         BegFile                         * show user bof
  1128. *
  1129. * 54 bytes Wed  10-10-1990  22:17:04 (line added TH)
  1130. *
  1131. * That's all, folks!
  1132.  
  1133.  
  1134.  
  1135. * ┌───────────────────────────────────────────────────────────────────┐
  1136. * │^(b) Replace "period space" w/ "period space space" - PARAGRAPH    │
  1137. * └───────────────────────────────────────────────────────────────────┘
  1138. * This macro was written by Tim Farley of SemWare.
  1139. *
  1140. * =========================================================================
  1141. * Date: 01-18-91 (13:59)           Number: 3433         SemWare Support BBS
  1142. *   To: BOB LONG                   Refer#: 3430
  1143. * From: TIM FARLEY                   Read: YES
  1144. * Subj: Legibility breaks            Conf: (21) ILink
  1145. * ------------------------------------------------------------------------
  1146. * BL>It had to do with retaining double spaces between sentences
  1147. * BL>even when they fall at the ends of lines and then get moved when the
  1148. * BL>paragraph is reformed.  I reinstalled 2.1, choosing the option to
  1149. * BL>retain trailing blanks, but QEdit still removes one blank.
  1150. * BL>
  1151. * BL>Is there a workaround?
  1152. *
  1153. * The only workaround I know for that one would be to encase
  1154. * WrapPara in a macro, that would mark the entire paragraph as a
  1155. * block, and do a global search and replace (limited to the block)
  1156. * to change ". " to ".  " to put the spaces back in.  Kludgy, and
  1157. * not perfect, but perhaps workable.
  1158. *
  1159. * Here's what it would look like:
  1160. *
  1161. * *
  1162. * * WrapPara modification:  retains double spacing after "." chars.
  1163. * *
  1164. ^b      MacroBegin UnmarkBlock      * we're going to be using blocks
  1165.         MarkCharacter WrapPara      * Wrap paragraph & mark rest of it
  1166.         MarkCharacter GotoBlockBeg  * Close mark & go to begin of it
  1167.         FindReplace ". " Return     * Change period with single space
  1168.         ".  " Return "LN" Return    * to one with double space.
  1169.         JFalse end:                 * None?  We're done...
  1170.         FindReplace ".   " Return   * Now fix any that ended up with 3
  1171.         ".  " Return "LN" Return    * to have just two again.
  1172.      end:
  1173.         GotoBlockEnd UnmarkBlock
  1174. *
  1175. * 54 bytes Fri  01-18-1991  21:23:45 (line added TH January 18, 1991)
  1176.  
  1177. *
  1178. * As usual, remove the comments to the right, and reformat this all on one
  1179. * line if you plan to put it in QCONFIG.DAT.
  1180. *
  1181. * --Tim Farley
  1182.  
  1183.  
  1184.  
  1185.  
  1186. * ┌──────────────────────────────────────────────────────────────────┐
  1187. * │^(c) Replace "period space" w/ "period space space" - DOCUMENT    │
  1188. * └──────────────────────────────────────────────────────────────────┘
  1189. *
  1190. *  Change "GN" to "G" for replacement with confirmation.
  1191. *
  1192. ^c      MacroBegin
  1193.         FindReplace ". "   Return ".  " Return "GN" Return
  1194.         FindReplace ".   " Return ".  " Return "GN" Return
  1195. *
  1196. *44 bytes Sat  01-19-1991  11:18:17
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205. * (VERSION) HISTORY:
  1206. *
  1207. *       1.1 - added Alt_6,7 & 8 to format QMAC txtfiles
  1208. *       1.1a- modified Alt_8,9 & 10 to get off screen-text in block
  1209. *       1.2 - added Alt_5 to format entire document QUICKLY keeping
  1210. *                         indented paragraph positions in place
  1211. *                   Alt_4 to format entire document keeping indented
  1212. *                         paragraph positions in place
  1213. *                   Alt_3 to format paragraph only
  1214. *           - modified other macros to handle line widths to 512
  1215. *       1.2a- modified this documentation
  1216. *       1.2b- Added @2 to make single column txtfile from
  1217. *             QMAC txtfile, v1.2b
  1218. *       1.2c- changed 160 in @9 to 512
  1219. *       1.2d- @2 removed, now in COLUMN10.ZIP
  1220. *           - @4 removed
  1221. *           - added killfile @0
  1222. *           - changed macro comments
  1223. *       1.3 - added Alt_1 & 2 to put asterisk and space in front
  1224. *             of blocks and paragraphs
  1225. *       1.4 - added Alt_4 to remove asterisk and space in column 1
  1226. *       1.5 - added Alt_t (from Tim Farley) to do the same as Alt_1
  1227. *           - changed key assignments
  1228. *           - added Alt_2 to remove asterisks in front of blocks
  1229. *           - shortened Alt_1 to 32 bytes
  1230. *       1.5a- modified Alt_1 to handle blocks with blank lines
  1231. *           - changed "60" in Ctl_0 to "69"
  1232. *           - Alt_t modified by Tim Farley to correctly handle column
  1233. *             and single line blocks.
  1234. *       1.5b- corrected documentation
  1235. *       1.5c- Changed file name REFORMxx to RFRMxx.
  1236. *       1.6 - Added @5.
  1237. *           - Changed ^5 and ^9 right margin to 69.
  1238. *           - Shortened ^8,9 and 0.
  1239. *       1.7 - Added @h to help locate items or macros from Index.
  1240. *           - Added @8 to have sentences end with "period space space"
  1241. *           - Added ^7 to Formats Message Reader Paragraph (Tim Farley)             132 <-new
  1242. *       1.8 - Added @9 and @0 to count number of words in a document.
  1243. *           - Added @n to count number of characters in a document.
  1244. *           - Added @F3 and @F4 to delete blank lines in documents.
  1245. *           - Added ^1/^2 to make/break-apart a comma delimited file.
  1246. *             (Written by Sammy Mitchell, SemWare)
  1247. *       1.9 - Shortened and removed redundant commands from @0.
  1248. *       2.0 - Added @F1 and @F2 to right justify documents.
  1249. *           - Added @F4 and @F5 to remove right justification.
  1250. *           - Modified documentation and added START.BAT.
  1251. *           - Changed REFORM file names to RFRM.
  1252. *           - Changed some key assignments of macros in previous version.
  1253. *       2.1 - Modified documentation (@f4 and @f5).
  1254. *       2.2 - Corrected @h Index Use instructions.
  1255. *           - Added ^b to change ". " to ".  " in PARAGRAPHS.
  1256. *           - Modidfied ^c to change ".   " to ".  " in DOCUMENTS.
  1257. *       2.3 - Modified @F1 to handle file names with no extension &
  1258. *             shortened 7 bytes.
  1259.  
  1260. * Tom Hogshead  Fri  02-15-1991
  1261.